package com.ai.entity.made.page;

import com.ai.entity.BasePage;
import com.ai.entity.made.QbeeTemplate;
import com.ai.entity.made.camera.CameraPO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.experimental.Accessors;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;

/**
 * @Author jiaok
 * @Date 2024-07-29 17:55
 */
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class QbeeTemplatePage extends BasePage<QbeeTemplate> {

    @Override
    public QueryWrapper<QbeeTemplate> getQuery(QueryWrapper<QbeeTemplate> queryWrapper) {
        return queryWrapper
                .ge((!com.alibaba.druid.util.StringUtils.isEmpty(getDatebegin())), "camera.create_time", getDatebegin())
                .lt((!com.alibaba.druid.util.StringUtils.isEmpty(getDateend())), "camera.create_time", getDateend())
                .orderByDesc("qbee_template.create_time");
    }



}
